// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

// This is a test for a crash withthe interpreter when evaluating properties

global Settings := {
    property <bool> test;
    property <color> some_color;
    property <string> some_string;
    property <int> count;
    property <{aa: bool, bb: int, cc: string}> object;
}

export Demo := Window {
    width: 300px;
    height: 300px;

    title: Settings.some_string;

    r:= Rectangle {
        background: Settings.test ? Settings.some_color : Settings.some_color;
    }

    for foo in Settings.count: Rectangle {}

    property <bool> obj: !Settings.object.aa && Settings.object.bb == 0 && Settings.object.cc == "";

    property <bool> test: title == "" && r.background == Settings.some_color && Settings.count == 0 && obj;

}
